home *** CD-ROM | disk | FTP | other *** search
/ GKGM 014 / GKGM014.iso / hentai / sex_kitten_sim_rpg.swf / scripts / DefineSprite_464 / frame_29 / PlaceObject2_353_233 / CLIPACTIONRECORD onClipEvent(enterFrame).as
Text File  |  2005-09-06  |  3KB  |  113 lines

  1. onClipEvent(enterFrame){
  2.    with(_root.hero)
  3.    {
  4.       if(Key.isDown(40) && !Key.isDown(37) && !Key.isDown(39))
  5.       {
  6.          if(_root.hero_face <= 8 || _root.hero_face > 12)
  7.          {
  8.             _root.hero_face = 9;
  9.          }
  10.          _root.hero_face += 1;
  11.          if(_root.hero_face == 13)
  12.          {
  13.             _root.hero_face = 9;
  14.          }
  15.          _root.hero_y += 8;
  16.       }
  17.       if(Key.isDown(38) && !Key.isDown(37) && !Key.isDown(39))
  18.       {
  19.          if(_root.hero_face > 4)
  20.          {
  21.             _root.hero_face = 1;
  22.          }
  23.          _root.hero_face += 1;
  24.          if(_root.hero_face == 5)
  25.          {
  26.             _root.hero_face = 1;
  27.          }
  28.          _root.hero_y -= 8;
  29.       }
  30.       if(Key.isDown(37) && !Key.isDown(40) && !Key.isDown(38))
  31.       {
  32.          if(_root.hero_face <= 12)
  33.          {
  34.             _root.hero_face = 13;
  35.          }
  36.          _root.hero_face += 1;
  37.          if(_root.hero_face == 17)
  38.          {
  39.             _root.hero_face = 13;
  40.          }
  41.          _root.hero_x -= 8;
  42.       }
  43.       if(Key.isDown(39) && !Key.isDown(40) && !Key.isDown(38))
  44.       {
  45.          if(_root.hero_face <= 4 || _root.hero_face > 8)
  46.          {
  47.             _root.hero_face = 5;
  48.          }
  49.          _root.hero_face += 1;
  50.          if(_root.hero_face == 9)
  51.          {
  52.             _root.hero_face = 5;
  53.          }
  54.          _root.hero_x += 8;
  55.       }
  56.       if(wall.hitTest(getBounds(_root).xMax,_y,true))
  57.       {
  58.          _root.hero_x -= 8;
  59.       }
  60.       if(wall.hitTest(getBounds(_root).xMin,_y,true))
  61.       {
  62.          _root.hero_x += 8;
  63.       }
  64.       if(wall.hitTest(_x,getBounds(_root).yMax,true))
  65.       {
  66.          _root.hero_y -= 8;
  67.       }
  68.       if(wall.hitTest(_x,getBounds(_root).yMin,true))
  69.       {
  70.          _root.hero_y += 8;
  71.       }
  72.       if(_root.front.door.hitTest(_x,getBounds(_root).yMax,true))
  73.       {
  74.          _root.hero_x = _root.hero_x_temp;
  75.          _root.hero_y = _root.hero_y_temp + 32;
  76.          _root.loc -= _root.house_level;
  77.       }
  78.       if(_root.front.person.hitTest(getBounds(_root).xMax,_y,true) || _root.front.person.hitTest(getBounds(_root).xMin,_y,true) || _root.front.person.hitTest(_x,getBounds(_root).yMax,true) || _root.front.person.hitTest(_x,getBounds(_root).yMin,true))
  79.       {
  80.          _root.help.gotoAndStop(2);
  81.          if(Key.isDown(32))
  82.          {
  83.             _root.house_loc = x;
  84.             _root.play();
  85.          }
  86.       }
  87.       else
  88.       {
  89.          _root.help.gotoAndStop(1);
  90.       }
  91.       if(_root.hero_x >= 480)
  92.       {
  93.          _root.loc += 1;
  94.          _root.hero_x = 48;
  95.       }
  96.       if(_root.hero_x <= 0)
  97.       {
  98.          _root.loc -= 1;
  99.          _root.hero_x = 456;
  100.       }
  101.       if(_root.hero_y >= 480)
  102.       {
  103.          _root.loc += _root.sq_level;
  104.          _root.hero_y = 48;
  105.       }
  106.       if(_root.hero_y <= 0)
  107.       {
  108.          _root.loc -= _root.sq_level;
  109.          _root.hero_y = 456;
  110.       }
  111.    }
  112. }
  113.